﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Creating the HibernateUtil.java Helper File3</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

<body>
<P><FONT face=Verdana color=#0000ff size=5>Creating the <STRONG>HibernateUtil.java</STRONG>  
 Helper File3</FONT> </P>
<P><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 11px/18px Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"></SPAN><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 11px/18px Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 
cellPadding=2 width="100%" border=1>
  
  <TR>
    <TD><SPAN 
      style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 11px/18px Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">To 
      use Hibernate you need to create a helper class that handles startup and 
      that accesses Hibernate's<SPAN 
      class=Apple-converted-space>&nbsp;</SPAN></SPAN><TT 
      style="WORD-SPACING: 0px; FONT: 1.1em/18px 'Courier New', monospace; TEXT-TRANSFORM: none; COLOR: black; TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">SessionFactory</TT><SPAN 
      style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 11px/18px Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
      class=Apple-converted-space>&nbsp;</SPAN>to obtain a Session 
    object</SPAN></TD>
    <TD><FONT size=2>để sử dụng Hibernate bạn cần tạo 
      ra&nbsp;một helper class nó quản lý việc bắt đầu và việc truy cập 
      SessionFactory để lấy về một Session object</FONT>             
                   
    </TD></TR>
  <TR>
    <TD><FONT size=2><FONT color=#333333> 
The class calls<SPAN class=Apple-converted-space>&nbsp;</SPAN></FONT></FONT><TT 
style="WORD-SPACING: 0px; FONT: 1.1em/18px 'Courier New', monospace; TEXT-TRANSFORM: none; COLOR: black; TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">configure()</TT><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 11px/18px Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-converted-space>&nbsp;</SPAN>and loads the<SPAN 
class=Apple-converted-space>&nbsp;</SPAN></SPAN><TT 
style="WORD-SPACING: 0px; FONT: 1.1em/18px 'Courier New', monospace; TEXT-TRANSFORM: none; COLOR: black; TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">hibernate.cfg.xml</TT><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 11px/18px Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-converted-space>&nbsp;</SPAN>configuration file and then builds 
the<SPAN class=Apple-converted-space>&nbsp;</SPAN></SPAN><TT 
style="WORD-SPACING: 0px; FONT: 1.1em/18px 'Courier New', monospace; TEXT-TRANSFORM: none; COLOR: black; TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">SessionFactory</TT><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 11px/18px Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(51,51,51); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
class=Apple-converted-space>&nbsp;</SPAN>to obtain the Session 
object</SPAN></TD>
    <TD>class này gọi configure() và load 
      hibernate.cfg.xml và builds SessionFactory để lấy về Session 
  object</TD></TR></TABLE></SPAN></P>    
</body>
</html>
